package org.example;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class ReadCtrlChar {
    public static void main(String[] args) throws IOException {
        try (BufferedReader br = new BufferedReader(new FileReader("output.txt"))) {
            int ch;
            while ((ch = br.read()) != -1) {
                if (ch < 32) {
                    System.out.println("控制字符: \\u" + String.format("%04x", ch));
                } else {
                    System.out.println("普通字符: " + (char) ch);
                }
            }
        }
    }
}
